#-----------------------------
# VisualK-OS                  
#    Module: Constants [v2.1] 
#    Author: Kevin Slaughter  
#-----------------------------

"""
[Revision History]
    v2.1: Moved COMMS-related constants into their own file.
    v2.0: Standardization, misc. optimizations.
    v1.0: Initial implementation.
"""



VERSION_STR = "v3.8"	# Version of control console. Overall software version.
from COMMS_Constants import *

### Python-related constants
# ScreenManager-related constants
SCREEN_MAIN 		= 666               # ScreenManager constant: Main menu
SCREEN_DEBUG		= (SCREEN_MAIN-1)   # ScreenManager constant: Console only - N curses UI
SCREEN_CFG_MAIN 	= (SCREEN_MAIN+1)   # ScreenManager constant: Main config menu
SCREEN_CFG_FBA		= (SCREEN_MAIN+2)   # ScreenManager constant: [cfg] Flood Bank Array
SCREEN_CFG_SS 		= (SCREEN_MAIN+3)   # ScreenManager constant: [cfg] SynthStation
SCREEN_CFG_THOR 	= (SCREEN_MAIN+4)   # ScreenManager constant: [cfg] Thor
SCREEN_MAPPING 		= (SCREEN_MAIN+5)   # ScreenManager constant: GamePad mapping
SCREEN_SCAN 		= (SCREEN_MAIN+6)   # ScreenManager constant: Scan for client devices
SCREEN_SYSMONITOR 	= (SCREEN_MAIN+7)   # ScreenManager constant: System stats monitor
SCREEN_MANUAL_FBA	= (SCREEN_MAIN+8)   # ScreenManager constant: Non-Gamepad-Dependent FBA tests
SCREEN_NULL 		= 0                 # ScreenManager feature: Causes the menu system to drop out the bottom.


# ASCII interpretation constants
KEY_0=48;KEY_1=49; KEY_2=50; KEY_3=51; KEY_4=52
KEY_5=53; KEY_6=54; KEY_7=55; KEY_8=56; KEY_9=57
KEY_ASTERISK=42 # "*"
KEY_LBRACKET=91 # "["
KEY_RBRACKET=93 # "]"
KEY_Z=122
KEY_F1=265; KEY_F2=266; KEY_F3=267; KEY_F4=268; KEY_F5=269; KEY_F6=270
KEY_F7=271; KEY_F8=272; KEY_F9=273; KEY_F10=274; KEY_F11=410; KEY_F12=276



# GamePad Button Constants  
B_SELECT=0      # PS3 Controller: Select
B_START=3       # PS3 Controller: Start
B_UP=4          # PS3 Controller: Up (directional pad)
B_RIGHT=5       # PS3 Controller: Right (directional pad)
B_DOWN=6        # PS3 Controller: Down (directional pad)
B_LEFT=7        # PS3 Controller: Left (directional pad)
B_L1=10         # PS3 Controller: L1
B_L2=8          # PS3 Controller: L2
B_L3=1          # PS3 Controller: L3
B_R1=11         # PS3 Controller: R1
B_R2=9          # PS3 Controller: R2
B_R3=2          # PS3 Controller: R3
B_TRIANGLE=12   # PS3 Controller: Triangle
B_CIRCLE=13     # PS3 Controller: Circle
B_X=14          # PS3 Controller: X
B_SQUARE=15     # PS3 Controller: Square


### Curses-related constants
#------------------------------------
# Color blocks for RGB configuration 
#------------------------------------
CB_BLUE    = 20     # ColorBlock: Blue
CB_CYAN    = 21     # ColorBlock: Cyan
CB_GREEN   = 22     # ColorBlock: Green
CB_MAGENTA = 23     # ColorBlock: Magenta
CB_ORANGE  = 24     # ColorBlock: Orange
CB_PURPLE  = 25     # ColorBlock: Purple
CB_RED	   = 26     # ColorBlock: Red
CB_WHITE   = 27     # ColorBlock: White
CB_YELLOW  = 28     # ColorBlock: Yellow

#----------------------------------
# Text types for curses formatting 
#----------------------------------
T_BLOCK     = 1     # Curses text specifications: Solid Block
T_NORMAL    = 2     # Curses text specifications: Normal
T_HEADER    = 3     # Curses text specifications: Header Text
T_HIGHLIGHT = 4     # Curses text specifications: Highlighted
T_ERROR     = 5     # Curses text specifications: Error (Strong Contrast)

# COMMS
CMD_HEADER = "!"    # Serial COMMS packet header
